package tmallgenie

import (
	"encoding/xml"
	"sync"

	"github.com/bububa/opentaobao/model"
)

// AlibabaAilabsTmallgenieThirdTelecomAutoauthAPIResponse 电信iot自动授权 API返回值
// alibaba.ailabs.tmallgenie.third.telecom.autoauth
//
// 电信iot自动授权
type AlibabaAilabsTmallgenieThirdTelecomAutoauthAPIResponse struct {
	model.CommonResponse
	AlibabaAilabsTmallgenieThirdTelecomAutoauthAPIResponseModel
}

// Reset 清空结构体
func (m *AlibabaAilabsTmallgenieThirdTelecomAutoauthAPIResponse) Reset() {
	(&m.CommonResponse).Reset()
	(&m.AlibabaAilabsTmallgenieThirdTelecomAutoauthAPIResponseModel).Reset()
}

// AlibabaAilabsTmallgenieThirdTelecomAutoauthAPIResponseModel is 电信iot自动授权 成功返回结果
type AlibabaAilabsTmallgenieThirdTelecomAutoauthAPIResponseModel struct {
	XMLName xml.Name `xml:"alibaba_ailabs_tmallgenie_third_telecom_autoauth_response"`
	// 平台颁发的每次请求访问的唯一标识
	RequestId string `json:"request_id,omitempty" xml:"request_id,omitempty"`
	// success
	Message string `json:"message,omitempty" xml:"message,omitempty"`
	// 错误码
	ResultCode int64 `json:"result_code,omitempty" xml:"result_code,omitempty"`
	// 是否成功
	Result bool `json:"result,omitempty" xml:"result,omitempty"`
}

// Reset 清空结构体
func (m *AlibabaAilabsTmallgenieThirdTelecomAutoauthAPIResponseModel) Reset() {
	m.RequestId = ""
	m.Message = ""
	m.ResultCode = 0
	m.Result = false
}

var poolAlibabaAilabsTmallgenieThirdTelecomAutoauthAPIResponse = sync.Pool{
	New: func() any {
		return new(AlibabaAilabsTmallgenieThirdTelecomAutoauthAPIResponse)
	},
}

// GetAlibabaAilabsTmallgenieThirdTelecomAutoauthAPIResponse 从 sync.Pool 获取 AlibabaAilabsTmallgenieThirdTelecomAutoauthAPIResponse
func GetAlibabaAilabsTmallgenieThirdTelecomAutoauthAPIResponse() *AlibabaAilabsTmallgenieThirdTelecomAutoauthAPIResponse {
	return poolAlibabaAilabsTmallgenieThirdTelecomAutoauthAPIResponse.Get().(*AlibabaAilabsTmallgenieThirdTelecomAutoauthAPIResponse)
}

// ReleaseAlibabaAilabsTmallgenieThirdTelecomAutoauthAPIResponse 将 AlibabaAilabsTmallgenieThirdTelecomAutoauthAPIResponse 保存到 sync.Pool
func ReleaseAlibabaAilabsTmallgenieThirdTelecomAutoauthAPIResponse(v *AlibabaAilabsTmallgenieThirdTelecomAutoauthAPIResponse) {
	v.Reset()
	poolAlibabaAilabsTmallgenieThirdTelecomAutoauthAPIResponse.Put(v)
}
